package com.ruoyi.xh.service.impl;

import java.util.stream.Collectors;
import java.util.stream.Stream;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.transaction.annotation.Transactional;
import com.ruoyi.xh.mapper.XhRegionCarMapper;
import com.ruoyi.xh.domain.XhRegionCar;
import com.ruoyi.xh.service.IXhRegionCarService;

/**
 * 物流车辆Service业务层处理
 * 
 * @author songjw
 * @date 2024-12-13
 */
@Service
public class XhRegionCarServiceImpl extends ServiceImpl<XhRegionCarMapper,XhRegionCar> implements IXhRegionCarService {

    /**
     * 查询物流车辆
     * 
     * @param id 物流车辆主键
     * @return 物流车辆
     */
    @Override
    public XhRegionCar selectXhRegionCarById(Long id)
    {
        return this.getById(id);
    }

    /**
     * 查询物流车辆列表
     * 
     * @param xhRegionCar 物流车辆
     * @return 物流车辆
     */
    @Override
    public Page<XhRegionCar> selectXhRegionCarList(XhRegionCar xhRegionCar)
    {
        return new Page<>();
    }

    /**
     * 新增物流车辆
     * 
     * @param xhRegionCar 物流车辆
     *
     */
    @Override
    public void insertXhRegionCar(XhRegionCar xhRegionCar)
    {
        this.save(xhRegionCar);
    }

    /**
     * 修改物流车辆
     * 
     * @param xhRegionCar 物流车辆
     *
     */
    @Override
    public void updateXhRegionCar(XhRegionCar xhRegionCar)
    {
        this.updateById(xhRegionCar);
    }

    /**
     * 批量删除物流车辆
     * 
     * @param ids 需要删除的物流车辆主键
     *
     */
    @Override
    @Transactional(rollbackFor = Exception.class)
    public void deleteXhRegionCarByIds(Long[] ids)
    {
        this.removeByIds(Stream.of(ids).collect(Collectors.toSet()));
    }
}
